package com.teachlearnweb.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.teachlearnweb.service.BookService;
import com.teachlearnweb.service.ServiceLocator;

/**
 * 
 * Class Used to locate the Service Objects.
 * 
 * @author GalaxE.
 *
 */
@SuppressWarnings("rawtypes")
@Component(value = "serviceLocator")
public class ServiceLocatorImpl implements ServiceLocator {

	private static ServiceLocatorImpl ourInstance = new ServiceLocatorImpl();
	
	@Autowired 
	@Qualifier(value="bookService")
	private BookService bookService;

	public static ServiceLocatorImpl getInstance() {
		return ourInstance;
	}

	private ServiceLocatorImpl() {

	}

	/**
	 * @return the bookService
	 */
	public BookService getBookService() {
		return bookService;
	}

	/**
	 * @param bookService the bookService to set
	 */
	public void setBookService(BookService bookService) {
		this.bookService = bookService;
	}

	

	
	
}